/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Presentation;

import BLO.*;
import DAO.ResultsModel;
import DTO.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTable;

/**
 *
 * @author LUCKYSTARS
 */
public class TraCuu extends javax.swing.JPanel {

    /**
     * Creates new form TraCuu
     */
    CauthuBLO ctBLO = new CauthuBLO();
    TraCuuBLO tcBLO = new TraCuuBLO();
    DoibongBLO dbBLO = new DoibongBLO();
    SanBLO sBLO= new SanBLO();
    HLVBLO hlvBLO= new HLVBLO();
    TrongtaiBLO ttBLO = new TrongtaiBLO();
    public TraCuu() {
        initComponents();
        try
        {
            //Cau thu
            ResultSet dtDB= dbBLO.Getdata1();
            while(dtDB.next())
            {
            cmbDoibongCT.addItem(dtDB.getString("Ten_DB"));
            }
            ResultsModel datatbCT = ctBLO.Getdata();
            JTable tb = new JTable(datatbCT);
            tb.setBounds(0, 0, 869, 300);
            JScrollPane jscoll = new JScrollPane(tb);
            jscoll.setBounds(0, 0, 869, 300);
            dgvCauthu.removeAll();
            dgvCauthu.add(jscoll);
            
            //DOi bong
            
            ResultSet dtSan=sBLO.Getdata();
            while (dtSan.next()) 
            {
            cmbSanDB.addItem(dtSan.getString("Ten_SAN"));
            }
            //Dua du lieu vao Combobox HLV
            ResultSet dtHlv=hlvBLO.Getdata();
            while (dtHlv.next()) 
            {
            cmbLHVDB.addItem(dtHlv.getString("HO_TEN"));
            }
            
            ResultsModel dtable= dbBLO.Getdata();
            JTable tb1= new JTable(dtable);
            tb1.setBounds(0,0,869,300);
            JScrollPane js= new JScrollPane(tb1);
            js.setBounds(0,0,869,300);
            dgvDoibong.removeAll();
            dgvDoibong.add(js);
          
             //Trong tai
            
           ResultsModel dtablehlv=  hlvBLO.Getdata1();
            JTable tbhlv= new JTable(dtablehlv);
            tbhlv.setBounds(0,0,869,300);
            JScrollPane jshlv= new JScrollPane(tbhlv);
            jshlv.setBounds(0,0,869,300);
            dgvHLV1.removeAll();
            dgvHLV1.add(jshlv);
            //
            ResultsModel dtableTT=  ttBLO.Getdata1();
            JTable tbTT= new JTable(dtableTT);
            tbTT.setBounds(0,0,869,300);
            JScrollPane jsTT= new JScrollPane(tbTT);
            jsTT.setBounds(0,0,869,300);
            dgvTrongtai1.removeAll();
            dgvTrongtai1.add(jsTT);
            
            
        }catch (SQLException ex) {
            JOptionPane.showMessageDialog(this,ex.getMessage() );
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btnGroupDB = new javax.swing.ButtonGroup();
        btnGroupCT = new javax.swing.ButtonGroup();
        btnGroupHLV = new javax.swing.ButtonGroup();
        btnGroupTT = new javax.swing.ButtonGroup();
        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        jtabtracuu = new javax.swing.JTabbedPane();
        tracuuct = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        rbtnMaCT = new javax.swing.JRadioButton();
        rbtnTenCT = new javax.swing.JRadioButton();
        rbtnQuocTich = new javax.swing.JRadioButton();
        rbtnVItri = new javax.swing.JRadioButton();
        rbtnDoibongCT = new javax.swing.JRadioButton();
        txtMaCT = new javax.swing.JTextField();
        txtTenCT = new javax.swing.JTextField();
        cmbDoibongCT = new javax.swing.JComboBox();
        cmbVitriCT = new javax.swing.JComboBox();
        cmbQuocTichCT = new javax.swing.JComboBox();
        jLabel1 = new javax.swing.JLabel();
        dgvCauthu = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        btnTimkiemCT = new javax.swing.JButton();
        btnRefreshCT = new javax.swing.JButton();
        btnTroveCT = new javax.swing.JButton();
        tracuudoibong = new javax.swing.JPanel();
        jPanel11 = new javax.swing.JPanel();
        rbtnMaDB = new javax.swing.JRadioButton();
        rbtnTenDB = new javax.swing.JRadioButton();
        rbtnHLVDB = new javax.swing.JRadioButton();
        rbtnSanDB = new javax.swing.JRadioButton();
        txtMadb = new javax.swing.JTextField();
        txtTendb = new javax.swing.JTextField();
        cmbLHVDB = new javax.swing.JComboBox();
        cmbSanDB = new javax.swing.JComboBox();
        jLabel4 = new javax.swing.JLabel();
        dgvDoibong = new javax.swing.JPanel();
        jPanel16 = new javax.swing.JPanel();
        btnTimkiemDB = new javax.swing.JButton();
        btnRefreshDB = new javax.swing.JButton();
        btnTroveDB = new javax.swing.JButton();
        tracuuhlv = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        rbtnMaHLV = new javax.swing.JRadioButton();
        rbtnTenHLV = new javax.swing.JRadioButton();
        rbtnQuoctichHLV = new javax.swing.JRadioButton();
        txtMaHLV = new javax.swing.JTextField();
        txtTenHLV = new javax.swing.JTextField();
        cmbQuoctich = new javax.swing.JComboBox();
        jLabel3 = new javax.swing.JLabel();
        dgvHLV1 = new javax.swing.JPanel();
        jPanel15 = new javax.swing.JPanel();
        btnTimkiemhlv = new javax.swing.JButton();
        btnRefreshHLV = new javax.swing.JButton();
        btnTroveHLV = new javax.swing.JButton();
        tracuutrongtai = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        dgvTrongtai1 = new javax.swing.JPanel();
        jPanel14 = new javax.swing.JPanel();
        btnTimKiem = new javax.swing.JButton();
        btnRefresh = new javax.swing.JButton();
        btnTrove = new javax.swing.JButton();
        jPanel10 = new javax.swing.JPanel();
        rbtnMaTT = new javax.swing.JRadioButton();
        rbtnTenTT = new javax.swing.JRadioButton();
        rbtnQuoctichTT = new javax.swing.JRadioButton();
        txtMaTT = new javax.swing.JTextField();
        txtTenTT = new javax.swing.JTextField();
        cmbQuocTichTT = new javax.swing.JComboBox();

        setPreferredSize(new java.awt.Dimension(869, 534));

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btnGroupCT.add(rbtnMaCT);
        rbtnMaCT.setText("Mã CT");
        rbtnMaCT.setName("");
        rbtnMaCT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnMaCTActionPerformed(evt);
            }
        });

        btnGroupCT.add(rbtnTenCT);
        rbtnTenCT.setText("Tên CT");
        rbtnTenCT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnTenCTActionPerformed(evt);
            }
        });

        btnGroupCT.add(rbtnQuocTich);
        rbtnQuocTich.setText("Quốc Tịch");
        rbtnQuocTich.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnQuocTichActionPerformed(evt);
            }
        });

        btnGroupCT.add(rbtnVItri);
        rbtnVItri.setText("Vị trí");
        rbtnVItri.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnVItriActionPerformed(evt);
            }
        });

        btnGroupCT.add(rbtnDoibongCT);
        rbtnDoibongCT.setText("Đội bóng");
        rbtnDoibongCT.setName("");
        rbtnDoibongCT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnDoibongCTActionPerformed(evt);
            }
        });

        txtMaCT.setEnabled(false);

        txtTenCT.setEnabled(false);

        cmbDoibongCT.setEnabled(false);

        cmbVitriCT.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "", "Tiền đạo", "Tiền vệ", "Hậu vệ", "Thủ môn" }));
        cmbVitriCT.setEnabled(false);

        cmbQuocTichCT.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "", "Việt Nam", "Lào", "Thái Lan", "Mỹ", "Brazil", "England" }));
        cmbQuocTichCT.setEnabled(false);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(38, 38, 38)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(rbtnMaCT)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtMaCT, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(rbtnTenCT)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtTenCT, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 72, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(rbtnQuocTich)
                    .addComponent(rbtnVItri))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(cmbVitriCT, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(cmbQuocTichCT, 0, 126, Short.MAX_VALUE))
                .addGap(80, 80, 80)
                .addComponent(rbtnDoibongCT)
                .addGap(18, 18, 18)
                .addComponent(cmbDoibongCT, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(53, 53, 53))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(rbtnQuocTich, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(cmbQuocTichCT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(rbtnVItri)
                            .addComponent(cmbVitriCT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(rbtnMaCT)
                                .addComponent(txtMaCT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(rbtnDoibongCT)
                                .addComponent(cmbDoibongCT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(rbtnTenCT)
                            .addComponent(txtTenCT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        jLabel1.setText("TRA CỨU THÔNG TIN CẦU THỦ");

        dgvCauthu.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout dgvCauthuLayout = new javax.swing.GroupLayout(dgvCauthu);
        dgvCauthu.setLayout(dgvCauthuLayout);
        dgvCauthuLayout.setHorizontalGroup(
            dgvCauthuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        dgvCauthuLayout.setVerticalGroup(
            dgvCauthuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 251, Short.MAX_VALUE)
        );

        jPanel5.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btnTimkiemCT.setText("Tìm Kiếm");
        btnTimkiemCT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTimkiemCTActionPerformed(evt);
            }
        });

        btnRefreshCT.setText("Refresh");
        btnRefreshCT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRefreshCTActionPerformed(evt);
            }
        });

        btnTroveCT.setText("Trở về");
        btnTroveCT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTroveCTActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(169, 169, 169)
                .addComponent(btnTimkiemCT)
                .addGap(134, 134, 134)
                .addComponent(btnRefreshCT)
                .addGap(136, 136, 136)
                .addComponent(btnTroveCT)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnTimkiemCT, javax.swing.GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE)
                    .addComponent(btnTroveCT, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnRefreshCT, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        javax.swing.GroupLayout tracuuctLayout = new javax.swing.GroupLayout(tracuuct);
        tracuuct.setLayout(tracuuctLayout);
        tracuuctLayout.setHorizontalGroup(
            tracuuctLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, tracuuctLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addGap(253, 253, 253))
            .addGroup(tracuuctLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(tracuuctLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(dgvCauthu, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        tracuuctLayout.setVerticalGroup(
            tracuuctLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(tracuuctLayout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addComponent(jLabel1)
                .addGap(18, 18, 18)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(13, 13, 13)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(dgvCauthu, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jtabtracuu.addTab("Cầu thủ", tracuuct);

        jPanel11.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btnGroupDB.add(rbtnMaDB);
        rbtnMaDB.setText("Mã ĐB:");
        rbtnMaDB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnMaDBActionPerformed(evt);
            }
        });

        btnGroupDB.add(rbtnTenDB);
        rbtnTenDB.setText("Tên ĐB:");
        rbtnTenDB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnTenDBActionPerformed(evt);
            }
        });

        btnGroupDB.add(rbtnHLVDB);
        rbtnHLVDB.setText("HLV:");
        rbtnHLVDB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnHLVDBActionPerformed(evt);
            }
        });

        btnGroupDB.add(rbtnSanDB);
        rbtnSanDB.setText("Sân:");
        rbtnSanDB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnSanDBActionPerformed(evt);
            }
        });

        txtMadb.setEnabled(false);

        txtTendb.setEnabled(false);

        cmbLHVDB.setEnabled(false);

        cmbSanDB.setEnabled(false);

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGap(51, 51, 51)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(rbtnTenDB)
                    .addComponent(rbtnMaDB))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtTendb, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtMadb, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 165, Short.MAX_VALUE)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(rbtnHLVDB)
                        .addGap(18, 18, 18)
                        .addComponent(cmbLHVDB, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(rbtnSanDB)
                        .addGap(18, 18, 18)
                        .addComponent(cmbSanDB, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(144, 144, 144))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtnMaDB)
                    .addComponent(rbtnHLVDB)
                    .addComponent(txtMadb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cmbLHVDB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtnTenDB)
                    .addComponent(rbtnSanDB)
                    .addComponent(txtTendb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cmbSanDB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(17, Short.MAX_VALUE))
        );

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        jLabel4.setText("TRA CỨU THÔNG TIN ĐỘI BÓNG");

        dgvDoibong.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout dgvDoibongLayout = new javax.swing.GroupLayout(dgvDoibong);
        dgvDoibong.setLayout(dgvDoibongLayout);
        dgvDoibongLayout.setHorizontalGroup(
            dgvDoibongLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 875, Short.MAX_VALUE)
        );
        dgvDoibongLayout.setVerticalGroup(
            dgvDoibongLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 219, Short.MAX_VALUE)
        );

        jPanel16.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btnTimkiemDB.setText("Tìm Kiếm");
        btnTimkiemDB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTimkiemDBActionPerformed(evt);
            }
        });

        btnRefreshDB.setText("Refresh");
        btnRefreshDB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRefreshDBActionPerformed(evt);
            }
        });

        btnTroveDB.setText("Trở về");
        btnTroveDB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTroveDBActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addGap(169, 169, 169)
                .addComponent(btnTimkiemDB)
                .addGap(134, 134, 134)
                .addComponent(btnRefreshDB)
                .addGap(136, 136, 136)
                .addComponent(btnTroveDB)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnTimkiemDB, javax.swing.GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE)
                    .addComponent(btnTroveDB, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnRefreshDB, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        javax.swing.GroupLayout tracuudoibongLayout = new javax.swing.GroupLayout(tracuudoibong);
        tracuudoibong.setLayout(tracuudoibongLayout);
        tracuudoibongLayout.setHorizontalGroup(
            tracuudoibongLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, tracuudoibongLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel4)
                .addGap(253, 253, 253))
            .addGroup(tracuudoibongLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(tracuudoibongLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(tracuudoibongLayout.createSequentialGroup()
                        .addGroup(tracuudoibongLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(dgvDoibong, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        tracuudoibongLayout.setVerticalGroup(
            tracuudoibongLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(tracuudoibongLayout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addComponent(jLabel4)
                .addGap(25, 25, 25)
                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(dgvDoibong, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jtabtracuu.addTab("Đội bóng", tracuudoibong);

        jPanel8.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btnGroupHLV.add(rbtnMaHLV);
        rbtnMaHLV.setText("Mã HLV");
        rbtnMaHLV.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnMaHLVActionPerformed(evt);
            }
        });

        btnGroupHLV.add(rbtnTenHLV);
        rbtnTenHLV.setText("Tên HLV");
        rbtnTenHLV.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnTenHLVActionPerformed(evt);
            }
        });

        btnGroupHLV.add(rbtnQuoctichHLV);
        rbtnQuoctichHLV.setText("Quốc tịch");
        rbtnQuoctichHLV.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnQuoctichHLVActionPerformed(evt);
            }
        });

        txtMaHLV.setEnabled(false);

        txtTenHLV.setEnabled(false);

        cmbQuoctich.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "", "Việt Nam", "Lào", "Thái Lan", "Mỹ", "Brazil", "England" }));
        cmbQuoctich.setEnabled(false);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGap(37, 37, 37)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(rbtnMaHLV)
                    .addComponent(rbtnTenHLV))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(txtMaHLV, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(rbtnQuoctichHLV)
                        .addGap(26, 26, 26)
                        .addComponent(cmbQuoctich, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(155, 155, 155))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(txtTenHLV, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(15, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtnMaHLV)
                    .addComponent(rbtnQuoctichHLV)
                    .addComponent(txtMaHLV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cmbQuoctich, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtnTenHLV)
                    .addComponent(txtTenHLV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(19, 19, 19))
        );

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        jLabel3.setText("TRA CỨU THÔNG TIN HLV");

        dgvHLV1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout dgvHLV1Layout = new javax.swing.GroupLayout(dgvHLV1);
        dgvHLV1.setLayout(dgvHLV1Layout);
        dgvHLV1Layout.setHorizontalGroup(
            dgvHLV1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 875, Short.MAX_VALUE)
        );
        dgvHLV1Layout.setVerticalGroup(
            dgvHLV1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 219, Short.MAX_VALUE)
        );

        jPanel15.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btnTimkiemhlv.setText("Tìm Kiếm");
        btnTimkiemhlv.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTimkiemhlvActionPerformed(evt);
            }
        });

        btnRefreshHLV.setText("Refresh");
        btnRefreshHLV.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRefreshHLVActionPerformed(evt);
            }
        });

        btnTroveHLV.setText("Trở về");
        btnTroveHLV.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTroveHLVActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addGap(169, 169, 169)
                .addComponent(btnTimkiemhlv)
                .addGap(134, 134, 134)
                .addComponent(btnRefreshHLV)
                .addGap(136, 136, 136)
                .addComponent(btnTroveHLV)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnTimkiemhlv, javax.swing.GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE)
                    .addComponent(btnTroveHLV, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnRefreshHLV, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        javax.swing.GroupLayout tracuuhlvLayout = new javax.swing.GroupLayout(tracuuhlv);
        tracuuhlv.setLayout(tracuuhlvLayout);
        tracuuhlvLayout.setHorizontalGroup(
            tracuuhlvLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, tracuuhlvLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel3)
                .addGap(253, 253, 253))
            .addGroup(tracuuhlvLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(tracuuhlvLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel15, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(tracuuhlvLayout.createSequentialGroup()
                        .addGroup(tracuuhlvLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(dgvHLV1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        tracuuhlvLayout.setVerticalGroup(
            tracuuhlvLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(tracuuhlvLayout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addComponent(jLabel3)
                .addGap(18, 18, 18)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(dgvHLV1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jtabtracuu.addTab("HLV", tracuuhlv);

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        jLabel2.setText("TRA CỨU THÔNG TIN TRỌNG TÀI");

        dgvTrongtai1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout dgvTrongtai1Layout = new javax.swing.GroupLayout(dgvTrongtai1);
        dgvTrongtai1.setLayout(dgvTrongtai1Layout);
        dgvTrongtai1Layout.setHorizontalGroup(
            dgvTrongtai1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 875, Short.MAX_VALUE)
        );
        dgvTrongtai1Layout.setVerticalGroup(
            dgvTrongtai1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 219, Short.MAX_VALUE)
        );

        jPanel14.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btnTimKiem.setText("Tìm Kiếm");
        btnTimKiem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTimKiemActionPerformed(evt);
            }
        });

        btnRefresh.setText("Refresh");
        btnRefresh.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRefreshActionPerformed(evt);
            }
        });

        btnTrove.setText("Trở về");
        btnTrove.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTroveActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addGap(169, 169, 169)
                .addComponent(btnTimKiem)
                .addGap(134, 134, 134)
                .addComponent(btnRefresh)
                .addGap(136, 136, 136)
                .addComponent(btnTrove)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnTimKiem, javax.swing.GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE)
                    .addComponent(btnTrove, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnRefresh, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        jPanel10.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btnGroupTT.add(rbtnMaTT);
        rbtnMaTT.setText("Mã TT");
        rbtnMaTT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnMaTTActionPerformed(evt);
            }
        });

        btnGroupTT.add(rbtnTenTT);
        rbtnTenTT.setText("Tên TT");
        rbtnTenTT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnTenTTActionPerformed(evt);
            }
        });

        btnGroupTT.add(rbtnQuoctichTT);
        rbtnQuoctichTT.setText("Quốc tịch:");
        rbtnQuoctichTT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnQuoctichTTActionPerformed(evt);
            }
        });

        txtMaTT.setEnabled(false);

        txtTenTT.setEnabled(false);

        cmbQuocTichTT.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "", "Việt Nam", "Lào", "Thái Lan", "Mỹ", "Brazil", "England" }));
        cmbQuocTichTT.setEnabled(false);

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGap(37, 37, 37)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(rbtnTenTT)
                    .addComponent(rbtnMaTT))
                .addGap(18, 18, 18)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(txtMaTT, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(rbtnQuoctichTT)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cmbQuocTichTT, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(187, 187, 187))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(txtTenTT, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()
                .addContainerGap(15, Short.MAX_VALUE)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtnMaTT)
                    .addComponent(rbtnQuoctichTT)
                    .addComponent(txtMaTT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cmbQuocTichTT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtnTenTT)
                    .addComponent(txtTenTT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(19, 19, 19))
        );

        javax.swing.GroupLayout tracuutrongtaiLayout = new javax.swing.GroupLayout(tracuutrongtai);
        tracuutrongtai.setLayout(tracuutrongtaiLayout);
        tracuutrongtaiLayout.setHorizontalGroup(
            tracuutrongtaiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, tracuutrongtaiLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel2)
                .addGap(253, 253, 253))
            .addGroup(tracuutrongtaiLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(tracuutrongtaiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(tracuutrongtaiLayout.createSequentialGroup()
                        .addComponent(dgvTrongtai1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        tracuutrongtaiLayout.setVerticalGroup(
            tracuutrongtaiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(tracuutrongtaiLayout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addComponent(jLabel2)
                .addGap(18, 18, 18)
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(dgvTrongtai1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jtabtracuu.addTab("Trọng tài", tracuutrongtai);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jtabtracuu)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jtabtracuu)
        );
    }// </editor-fold>//GEN-END:initComponents

    private void btnRefreshHLVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRefreshHLVActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnRefreshHLVActionPerformed
  
    private void btnTimkiemCTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTimkiemCTActionPerformed

        CAUTHU ctDTO = new CAUTHU();
        NGUOI nguoiDTO = new NGUOI();
        DOIBONG dbDTO = new DOIBONG();
        nguoiDTO.setManguoi(txtMaCT.getText().trim());
        nguoiDTO.setHoten(txtTenCT.getText().trim());
        nguoiDTO.setQuoctich(cmbQuocTichCT.getSelectedItem().toString().trim());
       //JOptionPane.showMessageDialog(null,cmbQuocTichCT.getSelectedItem().toString().trim(),"Thong bao",JOptionPane.INFORMATION_MESSAGE);  
        ctDTO.setNguoi(nguoiDTO);
        
        dbDTO.setTenDB(cmbDoibongCT.getSelectedItem().toString());
        dbDTO.setMaDB(dbBLO.GetMaFTenDoibong(dbDTO));
        ctDTO.setDoibong(dbDTO);
        
        ctDTO.setVitri(cmbVitriCT.getSelectedItem().toString().trim());
        //TRA CUU
        if (rbtnMaCT.isSelected())
          {
                    ResultsModel datatbCT = tcBLO.TimCTtheoMaCT(ctDTO);
                    JTable tb = new JTable(datatbCT);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                    dgvCauthu.removeAll();
                    dgvCauthu.add(jscoll);
         }
        if (rbtnTenCT.isSelected())
          {
                    ResultsModel datatbCT = tcBLO.TimCTtheoTenCT(ctDTO);
                    JTable tb = new JTable(datatbCT);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                    dgvCauthu.removeAll();
                    dgvCauthu.add(jscoll);
         }
        if (rbtnVItri.isSelected())
          {
                    ResultsModel datatbCT = tcBLO.TimCTtheoVT(ctDTO);
                    JTable tb = new JTable(datatbCT);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                    dgvCauthu.removeAll();
                    dgvCauthu.add(jscoll);
         }
        if (rbtnQuocTich.isSelected())
          {
                    ResultsModel datatbCT = tcBLO.TimCTtheoQTCT(ctDTO);
                    JTable tb = new JTable(datatbCT);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                    dgvCauthu.removeAll();
                    dgvCauthu.add(jscoll);
          }
        if (rbtnDoibongCT.isSelected())
          {
                    ResultsModel datatbCT = tcBLO.TimCTtheoDB(ctDTO);
                    JTable tb = new JTable(datatbCT);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                    dgvCauthu.removeAll();
                    dgvCauthu.add(jscoll);
         }
         
        // TODO add your handling code here:
    }//GEN-LAST:event_btnTimkiemCTActionPerformed

    private void rbtnMaCTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnMaCTActionPerformed
    
        if(rbtnMaCT.isSelected())
        {
           txtMaCT.setEnabled(true);
           
           rbtnTenCT.setSelected(false);
           rbtnDoibongCT.setSelected(false);
           rbtnQuocTich.setSelected(false);
           rbtnVItri.setSelected(false);
           
           cmbVitriCT.setEnabled(false);
           cmbVitriCT.setSelectedItem("");
           cmbQuocTichCT.setEnabled(false);
           cmbQuocTichCT.setSelectedItem("");
           cmbDoibongCT.setEnabled(false);
           cmbDoibongCT.setSelectedItem("");
           txtTenCT.setEnabled(false);
           txtTenCT.setText("");
        }
    }//GEN-LAST:event_rbtnMaCTActionPerformed

    private void rbtnTenCTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnTenCTActionPerformed
       
        if(rbtnTenCT.isSelected())
        {
           txtTenCT.setEnabled(true);
           
           rbtnMaCT.setSelected(false);
           rbtnDoibongCT.setSelected(false);
           rbtnQuocTich.setSelected(false);
           rbtnVItri.setSelected(false);
           
           cmbQuocTichCT.setEnabled(false);
           cmbQuocTichCT.setSelectedItem("");
           cmbVitriCT.setEnabled(false);
           cmbVitriCT.setSelectedItem("");
           cmbDoibongCT.setEnabled(false);
           cmbDoibongCT.setSelectedItem("");
           txtMaCT.setEnabled(false);
           txtMaCT.setText("");
        }
        // TODO add your handling code here:
    }//GEN-LAST:event_rbtnTenCTActionPerformed

    private void rbtnQuocTichActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnQuocTichActionPerformed
        // TODO add your handling code here:
        if(rbtnQuocTich.isSelected())
        {
           cmbQuocTichCT.setEnabled(true);
        
           rbtnMaCT.setSelected(false);
           rbtnTenCT.setSelected(false);
           rbtnDoibongCT.setSelected(false);
           rbtnVItri.setSelected(false);
           
           txtTenCT.setEnabled(false);
           txtTenCT.setText("");
           cmbVitriCT.setEnabled(false);
           cmbVitriCT.setSelectedItem("");
           cmbDoibongCT.setEnabled(false);
           cmbDoibongCT.setSelectedItem("");
           txtMaCT.setEnabled(false);
           txtMaCT.setText("");
        }
    }//GEN-LAST:event_rbtnQuocTichActionPerformed

    private void rbtnVItriActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnVItriActionPerformed

        if(rbtnVItri.isSelected())
        {
           cmbVitriCT.setEnabled(true);
           
           rbtnMaCT.setSelected(false);
           rbtnTenCT.setSelected(false);
           rbtnDoibongCT.setSelected(false);
           rbtnQuocTich.setSelected(false);
           
           txtTenCT.setEnabled(false);
           txtTenCT.setText("");
           cmbQuocTichCT.setEnabled(false);
           cmbQuocTichCT.setSelectedItem("");
           cmbDoibongCT.setEnabled(false);
           cmbDoibongCT.setSelectedItem("");
           txtMaCT.setEnabled(false);
           txtMaCT.setText("");
        }
        // TODO add your handling code here:
    }//GEN-LAST:event_rbtnVItriActionPerformed

    private void rbtnDoibongCTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnDoibongCTActionPerformed
        if(rbtnDoibongCT.isSelected()== true)
        {  
            cmbDoibongCT.setEnabled(true);
            rbtnMaCT.setSelected(false);
           rbtnTenCT.setSelected(false);
           
           rbtnQuocTich.setSelected(false);
           rbtnVItri.setSelected(false);
           txtTenCT.setEnabled(false);
           txtTenCT.setText("");
          cmbQuocTichCT.setEnabled(false);
           cmbQuocTichCT.setSelectedItem("");
           cmbVitriCT.setEnabled(false);
           cmbVitriCT.setSelectedItem("");
           
           txtMaCT.setEnabled(false);
           txtMaCT.setText("");
        }
        // TODO add your handling code here:
    }//GEN-LAST:event_rbtnDoibongCTActionPerformed

    //DOI BONG
    
    
    private void rbtnMaDBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnMaDBActionPerformed
        // TODO add your handling code here:
        if(rbtnMaDB.isSelected())
        {  
            txtMadb.setEnabled(true);
            
            rbtnTenDB.setSelected(false);
            rbtnHLVDB.setSelected(false);
            rbtnSanDB.setSelected(false);
           
            txtTendb.setEnabled(false);
            txtTendb.setText("");
            cmbLHVDB.setEnabled(false);
            cmbLHVDB.setSelectedItem("");
            cmbSanDB.setEnabled(false);
            cmbSanDB.setSelectedItem("");
            
        }
    }//GEN-LAST:event_rbtnMaDBActionPerformed

    private void rbtnTenDBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnTenDBActionPerformed
        // TODO add your handling code here:
        if(rbtnTenDB.isSelected())
        {  
            txtTendb.setEnabled(true);
            
            rbtnMaDB.setSelected(false);
            rbtnHLVDB.setSelected(false);
            rbtnSanDB.setSelected(false);
           
            cmbLHVDB.setEnabled(false);
            cmbLHVDB.setSelectedItem("");
            cmbSanDB.setEnabled(false);
            cmbSanDB.setSelectedItem("");
            txtMadb.setEnabled(false);
            txtMadb.setText("");
        }
    }//GEN-LAST:event_rbtnTenDBActionPerformed

    private void rbtnHLVDBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnHLVDBActionPerformed
        // TODO add your handling code here:
        if(rbtnHLVDB.isSelected())
        {  
            cmbLHVDB.setEnabled(true);
            
            rbtnTenDB.setSelected(false);
            rbtnMaDB.setSelected(false);
            rbtnSanDB.setSelected(false);
           
            txtTendb.setEnabled(false);
            txtTendb.setText("");
            cmbSanDB.setEnabled(false);
            cmbSanDB.setSelectedItem("");
            txtMadb.setEnabled(false);
            txtMadb.setText("");
        }
    }//GEN-LAST:event_rbtnHLVDBActionPerformed

    private void rbtnSanDBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnSanDBActionPerformed
        // TODO add your handling code here:
        if(rbtnSanDB.isSelected())
        {  
            cmbSanDB.setEnabled(true);
            
            rbtnTenDB.setSelected(false);
            rbtnHLVDB.setSelected(false);
            rbtnMaDB.setSelected(false);
           
            txtTendb.setEnabled(false);
            txtTendb.setText("");
            cmbLHVDB.setEnabled(false);
            cmbLHVDB.setSelectedItem("");
            txtMadb.setEnabled(false);
            txtMadb.setText("");
        }
    }//GEN-LAST:event_rbtnSanDBActionPerformed

    private void btnTimkiemDBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTimkiemDBActionPerformed
        // TODO add your handling code here:
        DOIBONG dbDTO= new DOIBONG();
        SAN sDTO= new SAN();
        NGUOI nDTO= new NGUOI();
        HLV hlvDTO= new HLV();
         
        dbDTO.setMaDB(txtMadb.getText().trim());
        dbDTO.setTenDB(txtTendb.getText().trim());
        //Lay du lieu tu combobox San
        sDTO.setTensan(cmbSanDB.getSelectedItem().toString().trim());
        //sDTO.setMasan(sBLO.GetMasanFTensan(sDTO));
        dbDTO.setSan(sDTO);
        //Lay du lieu tu combobox HLV
        nDTO.setHoten(cmbLHVDB.getSelectedItem().toString().trim());
        nDTO.setManguoi(hlvBLO.GetMaFTenHLV(nDTO));
        hlvDTO.setNguoi(nDTO);
        dbDTO.setHlv(hlvDTO);

        //TRA CUU
        if (rbtnMaDB.isSelected())
          {
                    ResultsModel datatbDB = tcBLO.TimDBtheoMaDB(dbDTO);
                    JTable tb = new JTable(datatbDB);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                    dgvDoibong.removeAll();
                    dgvDoibong.add(jscoll);
         }
         if (rbtnTenDB.isSelected())
          {
                    ResultsModel datatbDB = tcBLO.TimDBtheoTenDB(dbDTO);
                    JTable tb = new JTable(datatbDB);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                    dgvDoibong.removeAll();
                    dgvDoibong.add(jscoll);
         }
          if (rbtnHLVDB.isSelected())
          {
                    ResultsModel datatbDB = tcBLO.TimDBtheoHLVDB(dbDTO);
                    JTable tb = new JTable(datatbDB);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                    dgvDoibong.removeAll();
                    dgvDoibong.add(jscoll);
         }
           if (rbtnSanDB.isSelected())
          {
                    ResultsModel datatbDB = tcBLO.TimDBtheoSanDB(dbDTO);
                    JTable tb = new JTable(datatbDB);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                    dgvDoibong.removeAll();
                    dgvDoibong.add(jscoll);
         }
    }//GEN-LAST:event_btnTimkiemDBActionPerformed

    private void rbtnMaHLVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnMaHLVActionPerformed
        // TODO add your handling code here:
        if(rbtnMaHLV.isSelected())
        {  
            txtMaHLV.setEnabled(true);
            
            rbtnTenHLV.setSelected(false);
            rbtnQuoctichHLV.setSelected(false);
            
            txtTenHLV.setEnabled(false);
            txtTenHLV.setText("");
            cmbQuoctich.setEnabled(false);
            cmbQuoctich.setSelectedItem("");   
        }
    }//GEN-LAST:event_rbtnMaHLVActionPerformed

    private void rbtnTenHLVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnTenHLVActionPerformed
        // TODO add your handling code here:
        if(rbtnTenHLV.isSelected())
        {  
            txtTenHLV.setEnabled(true);
            
            rbtnMaHLV.setSelected(false);
            rbtnQuoctichHLV.setSelected(false);
            
           
            txtMaHLV.setEnabled(false);
            txtMaHLV.setText("");
            cmbQuoctich.setEnabled(false);
            cmbQuoctich.setSelectedItem("");
        }
    }//GEN-LAST:event_rbtnTenHLVActionPerformed

    private void rbtnQuoctichHLVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnQuoctichHLVActionPerformed
        // TODO add your handling code here:
        if(rbtnQuoctichHLV.isSelected())
        {  
            cmbQuoctich.setEnabled(true);
            
            rbtnTenHLV.setSelected(false);
            rbtnMaHLV.setSelected(false);
            
           
            txtTenHLV.setEnabled(false);
            txtTenHLV.setText("");
            txtMaHLV.setEnabled(false);
            txtMaHLV.setText("");
        }
    }//GEN-LAST:event_rbtnQuoctichHLVActionPerformed

    private void btnTimkiemhlvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTimkiemhlvActionPerformed
        // TODO add your handling code here
        NGUOI ngDTO = new NGUOI();
        HLV hlvDTO = new HLV();
        ngDTO.setManguoi(txtMaHLV.getText().trim());
        ngDTO.setHoten(txtTenHLV.getText().trim());
   
        ngDTO.setQuoctich(cmbQuoctich.getSelectedItem().toString().trim());
        hlvDTO.setNguoi(ngDTO);
        
        if (rbtnMaHLV.isSelected())
          {
                    ResultsModel datatbDB = tcBLO.TimHLVTheoMaHLV(hlvDTO);
                    JTable tb = new JTable(datatbDB);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                    dgvHLV1.removeAll();
                    dgvHLV1.add(jscoll);
         }
        
        if (rbtnTenHLV.isSelected())
          {
                    ResultsModel datatbDB = tcBLO.TimHLVTheoTenHLV(hlvDTO);
                    JTable tb = new JTable(datatbDB);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                       dgvHLV1.removeAll();
                    dgvHLV1.add(jscoll);
         }
        if (rbtnQuoctichHLV.isSelected())
          {
                    ResultsModel datatbDB = tcBLO.TimHLVTheoQuocTichHLV(hlvDTO);
                    JTable tb = new JTable(datatbDB);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                         dgvHLV1.removeAll();
                    dgvHLV1.add(jscoll);
         }
        
    }//GEN-LAST:event_btnTimkiemhlvActionPerformed

    private void rbtnMaTTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnMaTTActionPerformed
        // TODO add your handling code here:
         if(rbtnMaTT.isSelected())
        {  
            txtMaTT.setEnabled(true);
            
            rbtnTenTT.setSelected(false);
            rbtnQuoctichTT.setSelected(false);
            
            txtTenTT.setEnabled(false);
            txtTenTT.setText("");
            cmbQuocTichTT.setEnabled(false);
            cmbQuocTichTT.setSelectedItem("");   
        }
    }//GEN-LAST:event_rbtnMaTTActionPerformed

    private void rbtnTenTTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnTenTTActionPerformed
        // TODO add your handling code here:
        if(rbtnTenTT.isSelected())
        {  
            txtTenTT.setEnabled(true);
            
            rbtnMaTT.setSelected(false);
            rbtnQuoctichTT.setSelected(false);
            
           
            txtMaTT.setEnabled(false);
            txtMaTT.setText("");
            cmbQuocTichTT.setEnabled(false);
            cmbQuocTichTT.setSelectedItem("");
        }
    }//GEN-LAST:event_rbtnTenTTActionPerformed

    private void rbtnQuoctichTTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnQuoctichTTActionPerformed
        // TODO add your handling code here:
         if(rbtnQuoctichTT.isSelected())
        {  
            cmbQuocTichTT.setEnabled(true);
            
            rbtnTenTT.setSelected(false);
            rbtnMaTT.setSelected(false);
            
           
            txtTenTT.setEnabled(false);
            txtTenTT.setText("");
            txtMaTT.setEnabled(false);
            txtMaTT.setText("");
        }
    }//GEN-LAST:event_rbtnQuoctichTTActionPerformed

    private void btnTimKiemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTimKiemActionPerformed
        // TODO add your handling code here:
         NGUOI nguoiDTO = new NGUOI();
         TRONGTAI ttDTO = new TRONGTAI();
        nguoiDTO.setManguoi(txtMaTT.getText().trim());
        nguoiDTO.setHoten(txtTenTT.getText().trim());
        
        nguoiDTO.setQuoctich(cmbQuocTichTT.getSelectedItem().toString().trim());
        ttDTO.setNguoi(nguoiDTO);
        
        if (rbtnMaTT.isSelected())
          {
                    ResultsModel datatbDB = tcBLO.TimTTTheoMaTT(ttDTO);
                    JTable tb = new JTable(datatbDB);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                    dgvTrongtai1.removeAll();
                    dgvTrongtai1.add(jscoll);
         }
        
        if (rbtnTenTT.isSelected())
          {
                    ResultsModel datatbDB = tcBLO.TimTTTheoTenTT(ttDTO);
                    JTable tb = new JTable(datatbDB);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                  dgvTrongtai1.removeAll();
                    dgvTrongtai1.add(jscoll);
         }
        if (rbtnQuoctichTT.isSelected())
          {
                    ResultsModel datatbDB = tcBLO.TimTTTheoQuocTichTT(ttDTO);
                    JTable tb = new JTable(datatbDB);
                    tb.setBounds(0, 0, 869, 300);
                    JScrollPane jscoll = new JScrollPane(tb);       
                    jscoll.setBounds(0, 0, 869, 300);
                    dgvTrongtai1.removeAll();
                    dgvTrongtai1.add(jscoll);
         }
    }//GEN-LAST:event_btnTimKiemActionPerformed

    private void btnRefreshCTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRefreshCTActionPerformed
           try {
            ResultSet dtDB = dbBLO.Getdata1();
            while (dtDB.next()) {
                cmbDoibongCT.addItem(dtDB.getString("Ten_DB"));
            }
            ResultsModel datatbCT = ctBLO.Getdata();
            JTable tb = new JTable(datatbCT);
            tb.setBounds(0, 0, 869, 300);
            JScrollPane jscoll = new JScrollPane(tb);
            jscoll.setBounds(0, 0, 869, 300);
            dgvCauthu.removeAll();
            dgvCauthu.add(jscoll);
            
            rbtnMaCT.setSelected(false); 
            rbtnTenCT.setSelected(false);
           rbtnDoibongCT.setSelected(false);
           rbtnQuocTich.setSelected(false);
           rbtnVItri.setSelected(false);
           
           cmbVitriCT.setEnabled(false);
           cmbVitriCT.setSelectedItem("");
           cmbQuocTichCT.setEnabled(false);
           cmbQuocTichCT.setSelectedItem("");
           cmbDoibongCT.setEnabled(false);
           cmbDoibongCT.setSelectedItem("");
           txtTenCT.setEnabled(false);
           txtTenCT.setText("");
           txtMaCT.setEnabled(false);
           txtMaCT.setText("");
        } catch (SQLException sQLException) {
        }
        
        // TODO add your handling code here:
    }//GEN-LAST:event_btnRefreshCTActionPerformed

    private void btnRefreshDBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRefreshDBActionPerformed

         
         try {
            ResultSet dtSan = sBLO.Getdata();
            while (dtSan.next()) {
                cmbSanDB.addItem(dtSan.getString("Ten_SAN"));
            }
            //Dua du lieu vao Combobox HLV
            ResultSet dtHlv = hlvBLO.Getdata();
            while (dtHlv.next()) {
                cmbLHVDB.addItem(dtHlv.getString("HO_TEN"));
            }
            
            ResultsModel dtable = dbBLO.Getdata();
            JTable tb1 = new JTable(dtable);
            tb1.setBounds(0, 0, 869, 300);
            JScrollPane js = new JScrollPane(tb1);
            js.setBounds(0, 0, 869, 300);
            dgvDoibong.removeAll();
            dgvDoibong.add(js);
            
            rbtnMaDB.setSelected(false);
            rbtnTenDB.setSelected(false);
            rbtnHLVDB.setSelected(false);
            rbtnSanDB.setSelected(false);
           
            txtTendb.setEnabled(false);
            txtTendb.setText("");
            txtMadb.setEnabled(false);
            txtMadb.setText("");
            cmbLHVDB.setEnabled(false);
            cmbLHVDB.setSelectedItem("");
            cmbSanDB.setEnabled(false);
            cmbSanDB.setSelectedItem("");
        } catch (SQLException sQLException) {
        }
        // TODO add your handling code here:
    }//GEN-LAST:event_btnRefreshDBActionPerformed

    private void btnRefreshActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRefreshActionPerformed

            ResultsModel dtableTT=  ttBLO.Getdata1();
            JTable tbTT= new JTable(dtableTT);
            tbTT.setBounds(0,0,869,300);
            JScrollPane jsTT= new JScrollPane(tbTT);
            jsTT.setBounds(0,0,869,300);
            dgvTrongtai1.removeAll();
            dgvTrongtai1.add(jsTT);
            
             rbtnMaTT.setSelected(false);
            rbtnTenTT.setSelected(false);
            rbtnQuoctichTT.setSelected(false);
            
            txtTenTT.setEnabled(false);
            txtTenTT.setText("");
            txtMaTT.setEnabled(false);
            txtMaTT.setText("");
            cmbQuocTichTT.setEnabled(false);
            cmbQuocTichTT.setSelectedItem("");  
        
        // TODO add your handling code here:
    }//GEN-LAST:event_btnRefreshActionPerformed

    private void btnTroveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTroveActionPerformed
 this.setVisible(false);        // TODO add your handling code here:
    }//GEN-LAST:event_btnTroveActionPerformed

    private void btnTroveHLVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTroveHLVActionPerformed
 this.setVisible(false);        // TODO add your handling code here:
    }//GEN-LAST:event_btnTroveHLVActionPerformed

    private void btnTroveDBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTroveDBActionPerformed
 this.setVisible(false);        // TODO add your handling code here:
    }//GEN-LAST:event_btnTroveDBActionPerformed

    private void btnTroveCTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTroveCTActionPerformed
 this.setVisible(false);        // TODO add your handling code here:
    }//GEN-LAST:event_btnTroveCTActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup btnGroupCT;
    private javax.swing.ButtonGroup btnGroupDB;
    private javax.swing.ButtonGroup btnGroupHLV;
    private javax.swing.ButtonGroup btnGroupTT;
    private javax.swing.JButton btnRefresh;
    private javax.swing.JButton btnRefreshCT;
    private javax.swing.JButton btnRefreshDB;
    private javax.swing.JButton btnRefreshHLV;
    private javax.swing.JButton btnTimKiem;
    private javax.swing.JButton btnTimkiemCT;
    private javax.swing.JButton btnTimkiemDB;
    private javax.swing.JButton btnTimkiemhlv;
    private javax.swing.JButton btnTrove;
    private javax.swing.JButton btnTroveCT;
    private javax.swing.JButton btnTroveDB;
    private javax.swing.JButton btnTroveHLV;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JComboBox cmbDoibongCT;
    private javax.swing.JComboBox cmbLHVDB;
    private javax.swing.JComboBox cmbQuocTichCT;
    private javax.swing.JComboBox cmbQuocTichTT;
    private javax.swing.JComboBox cmbQuoctich;
    private javax.swing.JComboBox cmbSanDB;
    private javax.swing.JComboBox cmbVitriCT;
    private javax.swing.JPanel dgvCauthu;
    private javax.swing.JPanel dgvDoibong;
    private javax.swing.JPanel dgvHLV1;
    private javax.swing.JPanel dgvTrongtai1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JTabbedPane jtabtracuu;
    private javax.swing.JRadioButton rbtnDoibongCT;
    private javax.swing.JRadioButton rbtnHLVDB;
    private javax.swing.JRadioButton rbtnMaCT;
    private javax.swing.JRadioButton rbtnMaDB;
    private javax.swing.JRadioButton rbtnMaHLV;
    private javax.swing.JRadioButton rbtnMaTT;
    private javax.swing.JRadioButton rbtnQuocTich;
    private javax.swing.JRadioButton rbtnQuoctichHLV;
    private javax.swing.JRadioButton rbtnQuoctichTT;
    private javax.swing.JRadioButton rbtnSanDB;
    private javax.swing.JRadioButton rbtnTenCT;
    private javax.swing.JRadioButton rbtnTenDB;
    private javax.swing.JRadioButton rbtnTenHLV;
    private javax.swing.JRadioButton rbtnTenTT;
    private javax.swing.JRadioButton rbtnVItri;
    private javax.swing.JPanel tracuuct;
    private javax.swing.JPanel tracuudoibong;
    private javax.swing.JPanel tracuuhlv;
    private javax.swing.JPanel tracuutrongtai;
    private javax.swing.JTextField txtMaCT;
    private javax.swing.JTextField txtMaHLV;
    private javax.swing.JTextField txtMaTT;
    private javax.swing.JTextField txtMadb;
    private javax.swing.JTextField txtTenCT;
    private javax.swing.JTextField txtTenHLV;
    private javax.swing.JTextField txtTenTT;
    private javax.swing.JTextField txtTendb;
    // End of variables declaration//GEN-END:variables
}
